import { Admin } from "@/api";

// 加载当前登录人信息
let current_info = async (context, payload) => {
    let { status, msg, data } = await Admin.info(payload);
    if (status) {
        context.commit('CURRENT_INFO', data);
    }
    return { status, msg, data };
}

// 修改账户信息
let edit_info = async (context, payload) => {
    let { status, msg, data } = await Admin.account(payload);
    if (status) {
        context.commit('EDIT_INFO', payload);
    }
    return { status, msg, data };
}

export default {
    current_info,
    edit_info,
}